Skip to content

Add guarded filesystem API and join_segments - #4

Merged
aimable100 merged 3 commits into
mainfrom
codex/guard-api-0.4.0
Nov 11, 2026
Merged

aimable100 merged 3 commits into
mainfrom
codex/guard-api-0.4.0

Conversation

@aimable100

Copy link
Copy Markdown
Collaborator

Summary

  • expose FdJail, guarded file operations, capabilities, and attestations
  • add Jail.join_segments() for separately validated path components
  • upgrade to path_jail 0.6, PyO3 0.30, package version 0.4.0, and Python 3.14 CI coverage
  • document the guarded API and release changes

Validation

  • 70 Python tests pass on Python 3.13 and 3.14
  • cargo clippy --all-features -- -D warnings
  • Linux and Windows cross-target cargo checks
  • ruff and mypy
  • wheel and sdist builds

Closes #2
Closes #3

Copilot AI balanced review requested due to automatic review settings November 11, 2026 02:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved issues include descriptor double-close risks, GIL-held blocking opens that can deadlock, a Windows keyword-argument mismatch, and missing supported-Linux coverage for no_symlinks enforcement.

4 open issues
What changed in this PR

This PR extends the Python bindings with guarded filesystem access and independently validated path components, addressing the API requests in #2 and #3.

Changes:

  • Expose FdJail, guarded file and directory operations, capabilities, and attestations.
  • Add Jail.join_segments() with tests, type stubs, and usage examples.
  • Prepare release 0.4.0 with updated Rust dependencies and Python 3.14 CI coverage.
File Description
tests/​test_jail.py Add segment-validation and platform-aware guarded API tests.
src/​lib.rs Implement segment joining and guarded filesystem bindings.
README.md Document new APIs, examples, and platform security guarantees.
python/​path_jail/​__init__.pyi Define types for the new public APIs.
python/​path_jail/​__init__.py Export guarded API classes.
pyproject.toml Bump package version and advertise Python 3.14 support.
CHANGELOG.md Record the 0.4.0 release changes.
Cargo.toml Upgrade dependencies and enable the Rust guard feature.
.github/​workflows/​ci.yml Add Python 3.14 and adjust platform test coverage.

Review effort: Balanced

Comment thread src/lib.rs Resolved
Comment thread src/lib.rs Resolved
Comment thread src/lib.rs Resolved
Comment thread tests/test_jail.py Resolved
Copilot AI balanced review requested due to automatic review settings November 11, 2026 02:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Directory-open failures leak descriptors after Rust relinquishes ownership, allowing repeated calls to exhaust the process’s file descriptors.

1 open issue
4 resolved since last review

Review effort: Balanced

Comment thread src/lib.rs Resolved
Copilot AI balanced review requested due to automatic review settings November 11, 2026 17:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The security API depends on unavailable path_jail 0.6 internals, requiring native Linux/macOS validation of confinement guarantees, write-policy enforcement, and rejection of destructive open modes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@aimable100
aimable100 merged commit c607e07 into main Nov 11, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose segment joining and JailedPath Expose the guard API (FdJail) in Python

2 participants